Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huddle for Alonzo #4778

Merged
merged 6 commits into from
Dec 6, 2024
Merged

Huddle for Alonzo #4778

merged 6 commits into from
Dec 6, 2024

Conversation

aniketd
Copy link
Contributor

@aniketd aniketd commented Nov 28, 2024

Description

  • Alonzo: Switch to using Huddle/Cuddle.
    • Remove
      • crypto.cddl
      • extras.cddl
    • Add
      • Test.Cardano.Ledger.Alonzo.CDDL
      • cardano-ledger-alonzo:exe:huddle-cddle
      • huddleRoundTrip(Ann)CborSpec for all definitions already being tested
    • Autogenerate alonzo.cddl using Huddle/Cuddle
    • Update
      • hie.yaml with alonzo paths module and huddle-cddl
      • gen-cddl.sh to include alonzo
  • Mary: Refactor. Add comments. Backport MIR
  • Allegra: Refactor. Add comments. Backport MIR
  • Shelley: Refactor. Add comments. Backport MIR.
    • Backport move_instantaneous_reward.
    • Add delta_coin.
    • Reorganise the exports such that only the previous era CDDL needs to be imported in a following era to be overridden by explicitly hiding definitions.
  • Add bounded_bytes to core CDDL. Switch to heredoc.
    • We switch to heredoc for comments because it has a quasiquoter that preserves leading whitespace, namely [str||].

Resolves #4769

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@aniketd aniketd force-pushed the aniketd/huddle-alonzo branch 2 times, most recently from ea9c930 to d4fb77d Compare November 29, 2024 13:10
@aniketd aniketd force-pushed the aniketd/huddle-alonzo branch 4 times, most recently from 1786e19 to 72f406d Compare December 3, 2024 16:31
@aniketd aniketd marked this pull request as ready for review December 3, 2024 16:41
@aniketd aniketd requested a review from a team as a code owner December 3, 2024 16:41
@aniketd aniketd mentioned this pull request Dec 3, 2024
9 tasks
@aniketd aniketd force-pushed the aniketd/huddle-alonzo branch from 72f406d to 54b6dca Compare December 4, 2024 14:06
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome that you improved the previous era with the comments!
I have a few questions so far, will have a bit later another careful look at the alonzo.cddl differences.

@aniketd aniketd force-pushed the aniketd/huddle-alonzo branch from 54b6dca to caa7d5c Compare December 5, 2024 09:37
@aniketd aniketd requested a review from teodanciu December 5, 2024 09:38
@aniketd aniketd force-pushed the aniketd/huddle-alonzo branch from caa7d5c to a410380 Compare December 6, 2024 13:47
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Looks good to me

We switch to heredoc for comments because it has a quasiquoter that
preserves leading whitespace, namely `[str||]`.
Backport `move_instantaneous_reward`.
Add `delta_coin`.

Reorganise the exports such that only the previous era CDDL needs to be
imported in a following era to be overridden by explicitly hiding
definitions.
- Remove
  - crypto.cddl
  - extras.cddl
- Add
  - Test.Cardano.Ledger.Alonzo.CDDL
  - cardano-ledger-alonzo:exe:huddle-cddle
  - huddleRoundTrip(Ann)CborSpec for all definitions already being tested
- Autogenerate alonzo.cddl using Huddle/Cuddle
- Update
  - hie.yaml with alonzo paths module and huddle-cddl
  - gen-cddl.sh to include alonzo
@aniketd aniketd force-pushed the aniketd/huddle-alonzo branch from a410380 to 730df0c Compare December 6, 2024 16:23
@aniketd aniketd enabled auto-merge December 6, 2024 16:23
@aniketd aniketd merged commit f8b21d7 into master Dec 6, 2024
153 of 154 checks passed
@aniketd aniketd deleted the aniketd/huddle-alonzo branch December 6, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alonzo: Generate CDDL using Huddle/Cuddle
3 participants